import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';


import { SharedModule } from 'src/app/shared/shared.module';
// 导入 ngx-echarts
import { NgxEchartsModule } from 'ngx-echarts';

import { DataCenterComponent } from './data-center.component';
import { FileUploadComponent } from './data-center-overview/file-upload/file-upload.component';
import { DataCenterDetailComponent } from './data-center-detail/data-center-detail.component';
import { DataCenterOverviewComponent } from './data-center-overview/data-center-overview.component';
import { DetailDatasComponent } from './data-center-detail/detail-datas/detail-datas.component';
import { DetailTableComponent } from './data-center-detail/detail-table/detail-table.component';
import { LicenseModalComponent } from './data-center-modal/license-modal/license-modal.component';
import { LibraryModalComponent } from './data-center-modal/library-modal/library-modal.component';
import { ContainerModalComponent } from './data-center-modal/container-modal/container-modal.component';
import { CveModalComponent } from './data-center-modal/cve-modal/cve-modal.component';
import { BaselineListComponent } from './data-center-detail/detail-table/baseline-list/baseline-list.component';
import { AddRelevanceComponent } from './data-center-modal/add-relevance/add-relevance.component';
import { AddBaselineComponent } from './data-center-modal/add-baseline/add-baseline.component';

// 路由配置
const routes: Routes = [
  {
    // 一级路由
    path: '', component: DataCenterComponent,
    // 二级路由
    children: [
      { path: '', component: DataCenterOverviewComponent },
      { path: 'overview', component: DataCenterOverviewComponent },
      { path: 'detail', component: DataCenterDetailComponent },
    ]
  },
];

@NgModule({
  imports: [
    SharedModule,
    RouterModule.forChild(routes),
    NgxEchartsModule,
  ],
  entryComponents: [
    LicenseModalComponent,
    LibraryModalComponent,
    ContainerModalComponent,
    CveModalComponent,
    BaselineListComponent,
    AddRelevanceComponent,
    AddBaselineComponent
  ],
  declarations: [
    DataCenterComponent,
    FileUploadComponent,
    DataCenterDetailComponent,
    DataCenterOverviewComponent,
    DetailDatasComponent,
    DetailTableComponent,
    LicenseModalComponent,
    LibraryModalComponent,
    ContainerModalComponent,
    CveModalComponent,
    BaselineListComponent,
    AddRelevanceComponent,
    AddBaselineComponent
  ]
})
export class DataCenterModule {

}
